package com.zxn.rxbus.demo

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.hwangjr.rxbus.RxBus
import kotlinx.android.synthetic.main.activity_third.*

class ThirdActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_third)

        btn_close_all.setOnClickListener(View.OnClickListener {
            RxBus.get().post(IRxBusTags.CLOSE_ALL, true)
            finish()
        })

        btn_close1.setOnClickListener(View.OnClickListener {
            RxBus.get().post(IRxBusTags.CLOSE_WAY1, true)
            finish()
        })

        btn_close2.setOnClickListener(View.OnClickListener {
            RxBus.get().post(IRxBusTags.CLOSE_WAY2)
            finish()
        })
    }
}